﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TicketMaster.Object
{
    public class Bus
    {
        [Key]
        public int Id { get; set; }

        [Required]
        public int NumberOfSeat { get; set; }

        public int MerchantId { get; set; }

        public DateTime DepartureTime { get; set; }

        public int Duration { get; set; }

        public virtual Merchant Merchant { get; set; }

        public int RouteId { get; set; }

        [Required]
        public virtual Route Route { get; set; }

        public virtual ICollection<Seat> Seats { get; set; }

        public Bus()
        {
            this.Seats = new HashSet<Seat>();
        }
    }
}
